/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package web;

import baza.DBManager;
import java.util.List;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;
import javax.persistence.EntityManager;
import klasy.Pacjent;

/**
 *
 * @author Cyga
 */

@WebService(endpointInterface = "pai.web.PacjentInerface")
public class PBean {


EntityManager em;

public List<Pacjent> DownloadPacjent() {
    
       //EntityManager em = DBManager.getManager().createEntityManager();
        List list =em.createNamedQuery("Pacjent.findAll").getResultList();





return list;
}
}